package cn.wolfcode.luowowo.member.mapper;

import cn.wolfcode.luowowo.member.domain.UserInfo;

import cn.wolfcode.luowowo.small.domin.Goods;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface UserInfoMapper {
    int deleteByPrimaryKey(Long id);

    int insert(UserInfo record);

    UserInfo selectByPrimaryKey(Long id);

    List<UserInfo> selectAll();

    int updateByPrimaryKey(UserInfo record);

    int selectPhone(String phone);

    UserInfo selectUserByusernameAndPassword(@Param("username") String username, @Param("password") String password);

    Long getCoinByUserId(Long userId);

    void updateCoinByUserId(@Param("userId") Long userId, @Param("userCoin") Long coin);

    List<Goods> getGoodsByUserId(Long userId);

    void addUserCoinById(@Param("userId") Long userId, @Param("coin") Long coin);
}